<%@ page import="java.util.HashMap"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="com.jquery.dao.JqueryDao"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%

	JqueryDao dao = new JqueryDao();

	ArrayList<HashMap<String, String>> list = null;
	
	list =  dao.getDept();

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jquery</title>
 <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
 <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
 <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
 <link rel="stylesheet" href="/resources/demos/style.css">
 <style>
	  #resizable { width: 500px; height: 300px; padding: 0.5em; }
  	 #resizable h3 { text-align: center; margin: 0; }
  </style>
  <script>
  
  $(function() {
	    $( "#resizable" ).resizable({
	      grid: 50
	    });
	  });
  
  </script>
</head>
<body>


 <table border="1" cellpadding="0" cellspacing="0" id="resizable" class="ui-widget-content">
      <colgroup>
        <col width="30%">
        <col width="30%">
        <col width="30%">
      </colgroup>
      
      <thead>
        <tr> 
           <th>DEPT_ID</th><th>DEPT_NM</th><th>UP_DEPT_ID</th>
        </tr>
      </thead>
      
      <tbody>
         <!-- jstl을 이용하여 list에 담겨있는 Map의 value값을 호출  -->
         <c:forEach var="list" items="<%=list%>">
            <tr>
              <td>${list.DEPT_ID}</td>
              <td>${list.DEPT_NM}</td>
              <td>${list.UP_DEPT_ID}</td>
            </tr>
		 </c:forEach>
		 
      </tbody>
   </table>
   
  

   
   <input type="button" value="버튼" name="btn" />


</body>
</html>